<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateProfessor.xhtml">
	<ui:define name="conteudo">
		
		<p:growl autoUpdate="true" showDetail="true"/>
		
		<h:panelGrid columns="2">
			<h:outputText value="Horário: " />
			<h:outputText value="#{mBGerenciarDesempenho.aula.horario}" />
			<h:outputText value="Sala: " />
			<h:outputText value="#{mBGerenciarDesempenho.aula.sala.nome}" />
			<h:outputText value="Disciplina: " />
			<h:outputText value="#{mBGerenciarDesempenho.aula.disciplina.nome}" />
		</h:panelGrid>
		
		<h:form>
		
		
		<p:panel>
		<p:dataTable var="notaAluno" value="#{mBGerenciarDesempenho.listaNotaAluno}"  >
			<p:column headerText="Aluno" filterBy="#{notaAluno.aluno}">
				#{notaAluno.aluno}
			</p:column>
		
			<p:column headerText="Nota">
				<p:inputText value="#{notaAluno.nota}" required="true" size="3" requiredMessage="Inisira a nota de todos os Alunos" validatorMessage="A nota atribuida deve estar entre 0 e 10">
					<f:validateDoubleRange maximum="10" minimum="0"/>
				</p:inputText>
			</p:column>
		
		</p:dataTable>
		<p:commandButton value="Inserir" action="#{mBGerenciarDesempenho.cadastrarDesempenho()}" ajax="false"/>
		</p:panel>
		</h:form>
		
		
	</ui:define>
</ui:composition>
</html>